﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdSpaceList.aspx.cs" Inherits="Admin_AdSpaceList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>广告位列表</title>
    <link href="skin/css/base.css" rel="stylesheet" type="text/css" />
    <link href="skin/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="Header">
        父级：<asp:DropDownList ID="drpParentId" runat="server">
        </asp:DropDownList>
        &nbsp;广告位名称：<asp:TextBox ID="txtAdSpaceName" runat="server" Width="293px"></asp:TextBox>
        &nbsp;<asp:Button ID="btnQuery" runat="server" Text="查询" CausesValidation="false"
            OnClick="btnQuery_Click" />&nbsp;<asp:Button ID="btnAdd" runat="server" Text="添加"
                OnClick="btnAdd_Click" CausesValidation="false" />
    </div>
    <div>
        <table cellpadding="1" cellspacing="1">
            <tr class="trHeader">
                <td style="width: 5%">
                    Id
                </td>
                <td style="width: 45%">
                    广告位名称
                </td>
                <td style="width: 35%">
                    广告位描述
                </td>
                <td style="width: 15%">
                    操作
                </td>
            </tr>
            <asp:Repeater runat="server" ID="rptList" OnItemCommand="rptList_ItemCommand">
                <ItemTemplate>
                    <tr>
                        <td>
                            <%#Eval("Id")  %>
                        </td>
                        <td>
                            <%#Eval("AdSpaceName")%>
                        </td>
                        <td>
                            <%#Eval("AdSpaceDesc")%>
                        </td>
                        <td>
                            <asp:Button runat="server" ID="btnDel" CausesValidation="false" Text="删除" CommandArgument='<%#Eval("Id")  %>'
                                CommandName="Del" />
                            <asp:Button runat="server" ID="btnUpdate" CausesValidation="false" Text="修改" CommandArgument='<%#Eval("Id")  %>'
                                CommandName="Update" />
                            <asp:Button runat="server" ID="btnEditAdv" CausesValidation="false" Text="编辑广告" CommandArgument='<%#Eval("Id")  %>'
                                CommandName="Edit" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:Repeater>
        </table>
    </div>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server">
    </webdiyer:AspNetPager>
    <br />
    <table cellpadding="1" cellspacing="1" width="50%">
        <tr>
            <td style="width: 15%">
                广告位名称：
            </td>
            <td>
                <asp:TextBox ID="txtAdName" runat="server" Width="333px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAdName"
                    Display="Dynamic" ErrorMessage="不可以为空" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                父类：
            </td>
            <td>
                <asp:DropDownList ID="drpParentAd" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                广告位描述：
            </td>
            <td>
                <asp:TextBox ID="txtAdSpaceDesc" runat="server" TextMode="MultiLine" Width="333px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAdSpaceDesc"
                    Display="Dynamic" ErrorMessage="不可以为空" ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:HiddenField ID="Hid" runat="server" Value="" />
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
